<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function abs(x) {
            if(x >= 10){
                return x;
            }else{
                return 10;
            }
        }
        var abs2 = function(x){
            if(typeof x != 'number'){
                throw 'Not a Number';// 手动抛出异常
            }
            if(x >= 10){
                return x;
            }else{
                return 10;
            }
        }
        function f1(a, b){
            console.log("a=>", a);
            console.log("b=>", b);
            if(arguments.length > 2){
                for(var i = 2; i < arguments.length; i++){
                    console.log(arguments[i]);
                }
            }
        }
        function f2(a, b, ...rest){
            console.log("a=>", a);
            console.log("b=>", b);
            console.log(rest);
        }
    </script>
</head>
<body>

</body>
</html>